<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Open SCA: frameworks/DeviceMgr/src/LoadableDevice_servant.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.onetek.net"><img alt="Logo" src="openscaLogo.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Open SCA
   &#160;<span id="projectnumber">Version 0.6.0</span>
   </div>
   <div id="projectbrief">Open SCA</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_loadable_device__servant_8cpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">LoadableDevice_servant.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_loadable_device__servant_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/***************************************************************************/</span><span class="comment">/****************************************************************************/</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifdef __SDS_OS_VXWORKS__</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;loadLib.h&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;usrLib.h&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;../include/LoadableDevice_servant.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="utils_8h.html">utils.h</a>&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="class_loadable_device__servant.html#a1cb0d1e9cfd8ba22eeddeaa5e9e92317">   30</a></span>&#160;<a class="code" href="class_loadable_device__servant.html#a1cb0d1e9cfd8ba22eeddeaa5e9e92317">LoadableDevice_servant::LoadableDevice_servant</a>() {</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;}</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_loadable_device__servant.html#ae5822ac91a522beeffa895372474b369">   34</a></span>&#160;<a class="code" href="class_loadable_device__servant.html#a1cb0d1e9cfd8ba22eeddeaa5e9e92317">LoadableDevice_servant::LoadableDevice_servant</a>(</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordtype">char</span> * <span class="keywordtype">id</span>,</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordtype">char</span> * lbl,</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keywordtype">char</span> * sftwfrl) :</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <a class="code" href="class_device__servant.html">Device_servant</a> (id, lbl, sftwfrl) {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;}</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_loadable_device__servant.html#aae372633b7b25fd01047c69bbef1940e">   42</a></span>&#160;<a class="code" href="class_loadable_device__servant.html#aae372633b7b25fd01047c69bbef1940e">LoadableDevice_servant::~LoadableDevice_servant</a>() {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="class_loadable_device__servant.html#af7e9bdb132efe45d4d44e25382710888">   47</a></span>&#160;<a class="code" href="class_loadable_device__servant.html#af7e9bdb132efe45d4d44e25382710888">LoadableDevice_servant::configure</a>(</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keyword">const</span> CF::Properties &amp; configProperties)</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keywordflow">throw</span> (</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    CF::PropertySet::PartialConfiguration,</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    CF::PropertySet::InvalidConfiguration,</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    CORBA::SystemException) {</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;}</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="class_loadable_device__servant.html#a59b30b49006f58ed2d8e106600b71f7f">   96</a></span>&#160;<a class="code" href="class_loadable_device__servant.html#a59b30b49006f58ed2d8e106600b71f7f">LoadableDevice_servant::load</a>(</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    CF::FileSystem_ptr fs,</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span> * fileName,</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    CF::LoadableDevice::LoadType loadKind)</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="keywordflow">throw</span> (</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    CF::LoadableDevice::LoadFail,</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    CF::InvalidFileName,</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    CF::LoadableDevice::InvalidLoadKind,</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    CF::Device::InvalidState,</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    CORBA::SystemException) {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <a class="code" href="debug_8h.html#a4036580c4cea6cf404647d18f2fe3452">DEBUG</a>(5, <a class="code" href="class_loadable_device__servant.html">LoadableDevice_servant</a>, <span class="stringliteral">&quot;In load with fileName is: &quot;</span> &lt;&lt; fileName)</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="keywordflow">if</span> (CORBA::is_nil(fs)) {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                <a class="code" href="debug_8h.html#a4036580c4cea6cf404647d18f2fe3452">DEBUG</a>(5, DevMgr, <span class="stringliteral">&quot;load() input parameter:fs is invalid&quot;</span>)</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        }</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keywordflow">if</span> (fileName == NULL) {</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                <a class="code" href="debug_8h.html#a4036580c4cea6cf404647d18f2fe3452">DEBUG</a>(5, DevMgr, <span class="stringliteral">&quot;load() input parameter:fileName is null&quot;</span>)</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                <span class="keywordflow">throw</span> CF::InvalidFileName();</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        }</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_device__servant.html#acae45207a5b27a4ad9f448cc34df7f63">m_adminState</a> == CF::Device::LOCKED) {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                <a class="code" href="debug_8h.html#a4036580c4cea6cf404647d18f2fe3452">DEBUG</a>(5, DevMgr, <span class="stringliteral">&quot;Device admini state is locked: &quot;</span> &lt;&lt; <a class="code" href="class_device__servant.html#acae45207a5b27a4ad9f448cc34df7f63">m_adminState</a>)</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                <span class="keywordflow">throw</span> CF::Device::InvalidState();</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        }</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_device__servant.html#aa452f7d2185e99710f07b9886a977404">m_operationalState</a> == CF::Device::DISABLED) {</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                <a class="code" href="debug_8h.html#a4036580c4cea6cf404647d18f2fe3452">DEBUG</a>(5, DevMgr,</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                      <span class="stringliteral">&quot;device operational state is disabled&quot;</span> &lt;&lt; <a class="code" href="class_device__servant.html#aa452f7d2185e99710f07b9886a977404">m_operationalState</a>)</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                <span class="keywordflow">throw</span> CF::Device::InvalidState();</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        }</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="keywordflow">if</span> (!fs-&gt;exists(fileName)) {</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                <a class="code" href="debug_8h.html#a4036580c4cea6cf404647d18f2fe3452">DEBUG</a>(5, DevMgr,</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                      <span class="stringliteral">&quot;[LoadableDevice_servant::load]: &quot;</span> &lt;&lt; fileName &lt;&lt; <span class="stringliteral">&quot; don&#39;t exist.&quot;</span>)</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        }</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;}</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="class_loadable_device__servant.html#a299d43e01a9cb81725fbe057a9a5afe3">  155</a></span>&#160;<a class="code" href="class_loadable_device__servant.html#a299d43e01a9cb81725fbe057a9a5afe3">LoadableDevice_servant::unload</a>(</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span> * fileName)</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="keywordflow">throw</span> (</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    CF::InvalidFileName,</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    CF::Device::InvalidState,</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    CORBA::SystemException) {</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;}</div><div class="ttc" id="class_device__servant_html_acae45207a5b27a4ad9f448cc34df7f63"><div class="ttname"><a href="class_device__servant.html#acae45207a5b27a4ad9f448cc34df7f63">Device_servant::m_adminState</a></div><div class="ttdeci">CF::Device::AdminType m_adminState</div><div class="ttdef"><b>Definition:</b> <a href="_device__servant_8h_source.html#l00475">Device_servant.h:475</a></div></div>
<div class="ttc" id="class_loadable_device__servant_html_aae372633b7b25fd01047c69bbef1940e"><div class="ttname"><a href="class_loadable_device__servant.html#aae372633b7b25fd01047c69bbef1940e">LoadableDevice_servant::~LoadableDevice_servant</a></div><div class="ttdeci">~LoadableDevice_servant()</div><div class="ttdef"><b>Definition:</b> <a href="_loadable_device__servant_8cpp_source.html#l00042">LoadableDevice_servant.cpp:42</a></div></div>
<div class="ttc" id="utils_8h_html"><div class="ttname"><a href="utils_8h.html">utils.h</a></div><div class="ttdoc">:  </div></div>
<div class="ttc" id="debug_8h_html_a4036580c4cea6cf404647d18f2fe3452"><div class="ttname"><a href="debug_8h.html#a4036580c4cea6cf404647d18f2fe3452">DEBUG</a></div><div class="ttdeci">#define DEBUG(level, title, debuginfo)</div><div class="ttdef"><b>Definition:</b> <a href="debug_8h_source.html#l00055">debug.h:55</a></div></div>
<div class="ttc" id="class_device__servant_html_aa452f7d2185e99710f07b9886a977404"><div class="ttname"><a href="class_device__servant.html#aa452f7d2185e99710f07b9886a977404">Device_servant::m_operationalState</a></div><div class="ttdeci">CF::Device::OperationalType m_operationalState</div><div class="ttdef"><b>Definition:</b> <a href="_device__servant_8h_source.html#l00477">Device_servant.h:477</a></div></div>
<div class="ttc" id="class_device__servant_html"><div class="ttname"><a href="class_device__servant.html">Device_servant</a></div><div class="ttdoc">A device is a type of resource and has all the requirements associated with the Resource interface...</div><div class="ttdef"><b>Definition:</b> <a href="_device__servant_8h_source.html#l00046">Device_servant.h:46</a></div></div>
<div class="ttc" id="class_loadable_device__servant_html_af7e9bdb132efe45d4d44e25382710888"><div class="ttname"><a href="class_loadable_device__servant.html#af7e9bdb132efe45d4d44e25382710888">LoadableDevice_servant::configure</a></div><div class="ttdeci">void configure(const CF::Properties &amp;configProperties)</div><div class="ttdoc">The configure operation allows id/value pair configuration properties to be assigned to components im...</div><div class="ttdef"><b>Definition:</b> <a href="_loadable_device__servant_8cpp_source.html#l00047">LoadableDevice_servant.cpp:47</a></div></div>
<div class="ttc" id="class_loadable_device__servant_html_a59b30b49006f58ed2d8e106600b71f7f"><div class="ttname"><a href="class_loadable_device__servant.html#a59b30b49006f58ed2d8e106600b71f7f">LoadableDevice_servant::load</a></div><div class="ttdeci">void load(CF::FileSystem_ptr fs, const char *fileName, CF::LoadableDevice::LoadType loadKind)</div><div class="ttdoc">The load operation provides the mechanism for loading software on a specific device. </div><div class="ttdef"><b>Definition:</b> <a href="_loadable_device__servant_8cpp_source.html#l00096">LoadableDevice_servant.cpp:96</a></div></div>
<div class="ttc" id="class_loadable_device__servant_html_a299d43e01a9cb81725fbe057a9a5afe3"><div class="ttname"><a href="class_loadable_device__servant.html#a299d43e01a9cb81725fbe057a9a5afe3">LoadableDevice_servant::unload</a></div><div class="ttdeci">void unload(const char *fileName)</div><div class="ttdoc">The unload operation provides the mechanism to unload software that is currently loaded. </div><div class="ttdef"><b>Definition:</b> <a href="_loadable_device__servant_8cpp_source.html#l00155">LoadableDevice_servant.cpp:155</a></div></div>
<div class="ttc" id="class_loadable_device__servant_html_a1cb0d1e9cfd8ba22eeddeaa5e9e92317"><div class="ttname"><a href="class_loadable_device__servant.html#a1cb0d1e9cfd8ba22eeddeaa5e9e92317">LoadableDevice_servant::LoadableDevice_servant</a></div><div class="ttdeci">LoadableDevice_servant()</div><div class="ttdef"><b>Definition:</b> <a href="_loadable_device__servant_8cpp_source.html#l00030">LoadableDevice_servant.cpp:30</a></div></div>
<div class="ttc" id="class_loadable_device__servant_html"><div class="ttname"><a href="class_loadable_device__servant.html">LoadableDevice_servant</a></div><div class="ttdoc">This interface extends the Device interface by adding software loading and unloading behavior to a de...</div><div class="ttdef"><b>Definition:</b> <a href="_loadable_device__servant_8h_source.html#l00044">LoadableDevice_servant.h:44</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_27e7b6da28153e106312658788f622d3.html">frameworks</a></li><li class="navelem"><a class="el" href="dir_96d2e878d6d5ca438f56939d43d9e660.html">DeviceMgr</a></li><li class="navelem"><a class="el" href="dir_c5cf00d316aea2dbe84c19b3759bc329.html">src</a></li><li class="navelem"><a class="el" href="_loadable_device__servant_8cpp.html">LoadableDevice_servant.cpp</a></li>
    <li class="footer">Generated on Fri Jul 12 2019 14:31:51 for
    <a href="http://www.onetek.net">
    <img class="footer" src="openscaLogo.png" height="31" alt="openSCA"/></a>
    </li>
  </ul>
</div>
</body>
</html>
